package com.example.figurehecheng.common.result;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 封装分页查询结果
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PageResult implements Serializable {

    private long total; //总记录数

    private List records; //当前页数据集合

    private long pages;//当前也

    private long current;//查询条数

    public PageResult(long total, List records) {
        this.total = total;
        this.records = records;
    }

    public PageResult(long total, List records, long pages) {
        this.total = total;
        this.records = records;
        this.pages = pages;
    }


}
